{include 'header.tpl'}
<ol class="breadcrumb">
    <li><a href="/adminmall/User/tj">收入明细</a></li>
</ol>
<form method="get" action="/adminmall/User/tj" class="form-inline">
    <table>
        <tr>
            <td>
                <label for="form-w" class="control-label">时间范围：</label>
                <input type="text" class="date-picker" id="begin_date" name="begin_date" value="{$smarty.get.begin_date}" style="width: 85px;"/> 至 <input type="text" class="date-picker" id="end_date" name="end_date" value="{$smarty.get.end_date}" style="width: 85px;"/>
            </td>

            <td>
                <button type="submit" class="btn btn-primary">查找</button>
                <a href="/adminmall/User/tj" class="btn btn-danger">清空条件</a>
                {*<button type="button" onclick="dao()" class="btn btn-primary">导出</button>*}
            </td>
        </tr>
    </table>
</form>
<div class="clearfix" style="height:30px;"></div>

<table class="fTable" style="width: 60%">
    <thead>
    <tr>
        <th>类型</th>
        <th>收入金额</th>
    </tr>
    </thead>
    <tbody>
    <tr style="color: red;font-size: 110%;">
        <td>当天收入金额</td>
        <td>¥{$tongji['today_income']}</td>
    </tr>
    <tr style="color: red;font-size: 110%;">
        <td>周收入金额</td>
        <td>¥{$tongji['week_income']}</td>
    </tr>
    <tr style="color: red;font-size: 110%;">
        <td>月收入金额</td>
        <td>¥{$tongji['month_income']}</td>
    </tr>
    <tr style="color: red;font-size: 110%;">
        <td>所有收入金额</td>
        <td>¥{$tongji['all_income']}</td>
    </tr>
    </tbody>
</table>

<br>
<br>


<table class="table" style="table-layout: fixed;WORD-BREAK: break-all; WORD-WRAP: break-word">
    <tr>
        <td>用户ID</td>
        <td>收货人</td>
        <td>订单号</td>
        <td>支付金额</td>
        <td>联系手机</td>
        <td>所属连锁店</td>
        <td>下单时间</td>

    </tr>
    {foreach from=$data item=item}
        <tr>
            <td>{$item.uid}</td>
            <td>{$item.contact}</td>
            <td>{$item.o_id}</td>
            <td>{$item.pay_price}</td>
            <td>{$item.phone}</td>
            <td>
                {foreach $chainData as $k => $v}
                    {if $v['id'] eq $item.shop_id}{$v['name']}{/if}
                {/foreach}
            </td>
            <td>{$item.create_time}</td>
        </tr>
    {/foreach}
</table>
{include "pager.tpl"}
<script type="text/javascript">
    $(function () {
        create_date_picker();
    });

    function dao(){
        var nickname = $('#nickname').val();
        var mobile = $('#mobile').val();
        var begin_date = $('#begin_date').val();
        var end_date = $('#end_date').val();
        var intentionE1=$("#intention option:selected");
        var intention = intentionE1.val();
//        alert(intention);
//        alert(nickname);
//        alert(mobile);
//        alert(end_date);

        location.href = "/admin/Order/excelDao?begin_date=" + begin_date + "&end_date=" + end_date+ "&nickname=" + nickname+ "&mobile=" + mobile + "&intention=" + intention;

    }
</script>
{include 'footer.tpl'}